import request from '@/utils/request';

export async function getSWoptions(SWName) {
  return await request.post('/api/1.0/base/m812030tbinfo/list', {
    departmentName: SWName
  });
}

export async function getUserInfo(corpID) {
  return await request.post('/api/1.0/base/s903010manager/info', {
    companyId: corpID
  });
}

//查找机构用户列表
export async function getuserList(page) {
  return await request.post('/api/1.0/manager/user/regist', {
    pageCurrent: page
  });
}

//修改用户密码
export async function changePass(oldPass, newPass) {
  return await request.post('/api/1.0/manager/user/change/password', {
    oldPassWord: oldPass,
    newPassWord: newPass
  });
}

//提交注册用户
export async function register(
  hsCode,
  comName,
  gsCode,
  swCode,
  address,
  contact,
  phone,
  password
) {
  return await request.post('/api/1.0/manager/user/regist', {
    companyHsCode: hsCode,
    companyName: comName,
    buisnessDepartmentId: gsCode,
    taxDepartmentId: swCode,
    address: address,
    contactsPhone: contact,
    legalPersonPhone: phone,
    password: password
  });
}
